export default class bg extends Laya.Script {

    constructor() { 
        super(); 
        this.speed=20
        // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    }
    onAwake(){
        this.height=this.owner.height;
        
        Laya.timer.frameLoop(1,this,this.frameLoop)
        }
        frameLoop(){
        this.owner.y+=this.speed;
        if(this.owner.y>=this.height){
        this.owner.y-=this.height*2;
        }
    }
}